<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basedata/basedata/base_process.jsx此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/basedata/basedata/base_process.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'process_id',
            footer: "Foots",
            cnName: '工序',
            name: 'basedata/base_process',
            url: "/base_process/",
            sortName: "CreateDate"
        });
        const editFormFields = ref({ "processcode": "", "processname": "", "submitworklimit": [], "submitworkmatch": "", "defectltem": [] });
        const editFormOptions = ref([[{ "title": "工序编号", "field": "processcode", "type": "text" },
        { "title": "工序名称", "field": "processname", "type": "text" }],
        [{ "dataKey": "userWithAll", "data": [], "title": "报工权限", "field": "submitworklimit", "type": "selectList" },
        { "title": "报工数配比", "field": "submitworkmatch", "type": "decimal" }],
        [{ "dataKey": "defectltem", "data": [], "title": "不良品项列表", "field": "defectltem", "type": "selectList" }]]);
        const searchFormFields = ref({ "processcode": "", "processname": "", "submitworklimit": [], "submitworkmatch": [null, null], "defectltem": [] });
        const searchFormOptions = ref([[{ "title": "工序编号", "field": "processcode", "type": "like" }, { "title": "工序名称", "field": "processname", "type": "like" }, { "dataKey": "userWithAll", "data": [], "title": "报工权限", "field": "submitworklimit", "type": "selectList" }], [{ "title": "报工数配比", "field": "submitworkmatch", "type": "range" }, { "dataKey": "defectltem", "data": [], "title": "不良品项列表", "field": "defectltem", "type": "selectList" }]]);
        const columns = ref([{ field: 'process_id', title: '主键', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'processcode', title: '工序编号', type: 'string', width: 220, align: 'left', sort: true },
        { field: 'processname', title: '工序名称', type: 'string', link: true, width: 220, align: 'left' },
        { field: 'submitworklimit', title: '报工权限', type: 'string', bind: { key: 'userWithAll', data: [] }, width: 220, align: 'left' },
        { field: 'submitworkmatch', title: '报工数配比', type: 'decimal', width: 110, align: 'left' },
        { field: 'CreateID', title: '创建人编号', type: 'int', width: 120, hidden: true, align: 'left' },
        { field: 'CreateDate', title: '创建时间', type: 'datetime', width: 120, align: 'left', sort: true },
        { field: 'Creator', title: '创建人', type: 'string', width: 120, align: 'left' },
        { field: 'Modifier', title: '修改人', type: 'string', width: 120, align: 'left' },
        { field: 'ModifyDate', title: '修改时间', type: 'datetime', width: 120, align: 'left', sort: true },
        { field: 'ModifyID', title: '修改人编号', type: 'int', width: 120, hidden: true, align: 'left' },
        { field: 'defectltem', title: '不良品项列表', type: 'string', bind: { key: 'defectltem', data: [] }, width: 120, align: 'left' }]);
        const detail = ref({
            cnName: "工序数据采集",
            table: "base_processlist",
            columns: [{ field: 'processlist_id', title: '主键Id', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
            { field: 'process_id', title: '工序', type: 'int', bind: { key: 'process', data: [] }, width: 110, align: 'left', sort: true },
            { field: 'datapointtype', title: '类型', type: 'string', bind: { key: 'datapointtype', data: [] }, width: 220, edit: { type: 'select' }, align: 'left' },
            { field: 'datapointname', title: '名称', type: 'string', width: 220, edit: { type: 'text' }, align: 'left' },
            { field: 'CreateID', title: '创建人编号', type: 'int', width: 100, hidden: true, align: 'left' },
            { field: 'Creator', title: '创建人', type: 'string', width: 100, align: 'left' },
            { field: 'CreateDate', title: '创建时间', type: 'datetime', width: 150, align: 'left', sort: true },
            { field: 'Modifier', title: '更新人', type: 'string', width: 100, align: 'left' },
            { field: 'ModifyDate', title: '更新时间', type: 'datetime', width: 150, align: 'left', sort: true },
            { field: 'ModifyID', title: '更新人编号', type: 'int', width: 100, hidden: true, align: 'left' }],
            sortName: "processlist_id",
            key: "processlist_id"
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
